\hypertarget{classc_camera_u_v_n}{\section{c\-Camera\-U\-V\-N类 参考}
\label{classc_camera_u_v_n}\index{c\-Camera\-U\-V\-N@{c\-Camera\-U\-V\-N}}
}


摄像机类。 \hyperlink{classc_camera_u_v_n_add0b3df8c8545926d18007432f4e8021}{compute\-V2()}c\-Terrain函数，而c\-Terrain又依赖c\-Ground函数。因此camera依赖c\-Ground；  




{\ttfamily \#include $<$camera.\-h$>$}

\subsection*{Public 类型}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries camera\-\_\-type} \{ {\bfseries L\-A\-N\-D}, 
{\bfseries A\-I\-R}
 \}
\end{DoxyCompactItemize}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_camera_u_v_n_a15a38e1106e6a3c7b0e89c7db477cc47}{{\bfseries c\-Camera\-U\-V\-N} (camera\-\_\-type type=L\-A\-N\-D)}\label{classc_camera_u_v_n_a15a38e1106e6a3c7b0e89c7db477cc47}

\item 
\hypertarget{classc_camera_u_v_n_a6251c42398d86ab2858caf440288703d}{void {\bfseries init} (int width=800, int height=600, D3\-D\-X\-V\-E\-C\-T\-O\-R3 pos=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 0, 0), D3\-D\-X\-V\-E\-C\-T\-O\-R3 lookat=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 0, 1), D3\-D\-X\-V\-E\-C\-T\-O\-R3 up=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 1, 0), float fov=D3\-D\-X\-\_\-\-P\-I/4, float zn=0.\-01f, float zf=5000.\-0f)}\label{classc_camera_u_v_n_a6251c42398d86ab2858caf440288703d}

\item 
\hypertarget{classc_camera_u_v_n_a19d3ed6f89444ccf38d0bdacacf65ed8}{void {\bfseries compute} ()}\label{classc_camera_u_v_n_a19d3ed6f89444ccf38d0bdacacf65ed8}

\item 
\hypertarget{classc_camera_u_v_n_a614b4fb80a2d89870c936afe4ebde325}{void \hyperlink{classc_camera_u_v_n_a614b4fb80a2d89870c936afe4ebde325}{reset} ()}\label{classc_camera_u_v_n_a614b4fb80a2d89870c936afe4ebde325}

\begin{DoxyCompactList}\small\item\em 内部调用init()。 \end{DoxyCompactList}\item 
\hypertarget{classc_camera_u_v_n_ade626fa6654937998634fca95bf6a6ea}{void {\bfseries rotate\-\_\-x\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_ade626fa6654937998634fca95bf6a6ea}

\item 
\hypertarget{classc_camera_u_v_n_ad2c6720b5fd00ec47b6bc6a2b68059bd}{void {\bfseries rotate\-\_\-y\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_ad2c6720b5fd00ec47b6bc6a2b68059bd}

\item 
\hypertarget{classc_camera_u_v_n_ad72539d9e5ea70884b4bbb6e00cbed21}{void {\bfseries rotate\-\_\-z\-\_\-axis} (float angle)}\label{classc_camera_u_v_n_ad72539d9e5ea70884b4bbb6e00cbed21}

\item 
\hypertarget{classc_camera_u_v_n_aab6fb6dc9490bfcef1edb034fd865b24}{void {\bfseries walk\-\_\-x\-\_\-axis} (float units)}\label{classc_camera_u_v_n_aab6fb6dc9490bfcef1edb034fd865b24}

\item 
\hypertarget{classc_camera_u_v_n_a8612839850d695bafb56726a623aeb65}{void {\bfseries walk\-\_\-y\-\_\-axis} (float units)}\label{classc_camera_u_v_n_a8612839850d695bafb56726a623aeb65}

\item 
\hypertarget{classc_camera_u_v_n_a3ccb08226914486ea8681eb055b683d7}{void {\bfseries walk\-\_\-z\-\_\-axis} (float units)}\label{classc_camera_u_v_n_a3ccb08226914486ea8681eb055b683d7}

\item 
\hypertarget{classc_camera_u_v_n_a187d5dee1c5fddb1ab6c78a10e939bf7}{D3\-D\-X\-M\-A\-T\-R\-I\-X \& {\bfseries get\-View\-Matrix} ()}\label{classc_camera_u_v_n_a187d5dee1c5fddb1ab6c78a10e939bf7}

\item 
\hypertarget{classc_camera_u_v_n_a207c5cc2d7e2d34e0e6d55cee23b1482}{D3\-D\-X\-M\-A\-T\-R\-I\-X \& {\bfseries get\-Proj\-Matrix} ()}\label{classc_camera_u_v_n_a207c5cc2d7e2d34e0e6d55cee23b1482}

\item 
\hypertarget{classc_camera_u_v_n_a46f3f53812fa10c6c2b8c3cd48ad4d03}{void {\bfseries get\-View\-Port} (D3\-D\-V\-I\-E\-W\-P\-O\-R\-T9 \&t)}\label{classc_camera_u_v_n_a46f3f53812fa10c6c2b8c3cd48ad4d03}

\item 
\hypertarget{classc_camera_u_v_n_a15373f54082964ea8baaca3363b02bf6}{void {\bfseries set\-Pos} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 t)}\label{classc_camera_u_v_n_a15373f54082964ea8baaca3363b02bf6}

\item 
\hypertarget{classc_camera_u_v_n_a5fd1afe76467afb77dbd0624af1dd5d4}{void {\bfseries get\-Pos} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 \&t)}\label{classc_camera_u_v_n_a5fd1afe76467afb77dbd0624af1dd5d4}

\item 
\hypertarget{classc_camera_u_v_n_a5ff4b0b892726ede08d242d48ea9498d}{void {\bfseries get\-Deep} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 \&t)}\label{classc_camera_u_v_n_a5ff4b0b892726ede08d242d48ea9498d}

\item 
\hypertarget{classc_camera_u_v_n_a4c730e764147f04dbb7877c0be4548d9}{D3\-D\-X\-V\-E\-C\-T\-O\-R3 \& {\bfseries get\-\_\-pos} ()}\label{classc_camera_u_v_n_a4c730e764147f04dbb7877c0be4548d9}

\item 
\hypertarget{classc_camera_u_v_n_a7fe632d434a24a560f07cea38f61d048}{void {\bfseries compute\-V1} ()}\label{classc_camera_u_v_n_a7fe632d434a24a560f07cea38f61d048}

\item 
\hypertarget{classc_camera_u_v_n_acfa7bac892981f4b63726bb8a3844aca}{void {\bfseries set\-Lookat} (D3\-D\-X\-V\-E\-C\-T\-O\-R3 t)}\label{classc_camera_u_v_n_acfa7bac892981f4b63726bb8a3844aca}

\item 
void \hyperlink{classc_camera_u_v_n_add0b3df8c8545926d18007432f4e8021}{compute\-V2} (\hyperlink{classc_input_controller}{c\-Input\-Controller} $\ast$p\-Input, float delt\-\_\-time, \hyperlink{classc_terrain}{c\-Terrain} $\ast$p\-Terrain, float Offset\-Y)
\item 
\hypertarget{classc_camera_u_v_n_a8f98cf977c25d65c169a91b055302c61}{void \hyperlink{classc_camera_u_v_n_a8f98cf977c25d65c169a91b055302c61}{set\-Speed} (float s)}\label{classc_camera_u_v_n_a8f98cf977c25d65c169a91b055302c61}

\begin{DoxyCompactList}\small\item\em 设置摄像机移动的速度。 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
摄像机类。 \hyperlink{classc_camera_u_v_n_add0b3df8c8545926d18007432f4e8021}{compute\-V2()}c\-Terrain函数，而c\-Terrain又依赖c\-Ground函数。因此camera依赖c\-Ground； 

\subsection{成员函数说明}
\hypertarget{classc_camera_u_v_n_add0b3df8c8545926d18007432f4e8021}{\index{c\-Camera\-U\-V\-N@{c\-Camera\-U\-V\-N}!compute\-V2@{compute\-V2}}
\index{compute\-V2@{compute\-V2}!cCameraUVN@{c\-Camera\-U\-V\-N}}
\subsubsection[{compute\-V2}]{\setlength{\rightskip}{0pt plus 5cm}void c\-Camera\-U\-V\-N\-::compute\-V2 (
\begin{DoxyParamCaption}
\item[{{\bf c\-Input\-Controller} $\ast$}]{p\-Input, }
\item[{float}]{delt\-\_\-time, }
\item[{{\bf c\-Terrain} $\ast$}]{p\-Terrain, }
\item[{float}]{Offset\-Y}
\end{DoxyParamCaption}
)}}\label{classc_camera_u_v_n_add0b3df8c8545926d18007432f4e8021}

\begin{DoxyItemize}
\item 
\end{DoxyItemize}1$\ast$ 

该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
E\-:/!代码工厂/3\-D引擎/camera.\-h\item 
E\-:/!代码工厂/3\-D引擎/camera.\-cpp\end{DoxyCompactItemize}
